/*
 * @Author: 徐博 
 * @Date: 2023-02-20 14:33:51 
 * @Last Modified by: 徐博
 * @Last Modified time: 2023-02-21 09:10:37
 */

import { App, createVNode, render, VNode } from "vue";
import FeSpin from './fe-spin.vue';
export default {
    install(app: App) {
        const vNode: VNode = createVNode(FeSpin) //转成vnode
        render(vNode, document.body) //转成真实dom，第二个参数是挂载在哪里
        app.config.globalProperties.$spin = {     // 全局挂载
            show: vNode.component?.exposed?.show,
            hide: vNode.component?.exposed?.hide,
        }
    },
}
